1. Field of the Invention
This invention relates to data processing systems and more specifically to a data processing system which provides for execution of decimal numeric software instructions.
2. Description of the Prior Art
There are primarily two different methods employed within modern data processing systems for representing numeric data.
It can be represented in a binary format in which each bit within a word is given a weight of 2 raised to a power such that the least significant bit, when a binary ONE, represents 2 to the zeroth power, the next more significant bit, when a binary ONE, represents 2 to the first power and so on. Negative numbers in a binary format may be indicated by a sign bit at either the beginning or end of the number or by performing a two's complement on the number.
The other method of representing numbers is to represent them in some type of decimal format. The decimal format commonly used is to have each decimal digit represented by four or more bits with the bits being binary encoded to represent the values of 0 to 9 decimal. Representing numbers in the decimal format has two disadvantages. First, as the number gets larger, more bits are required to represent a number in a decimal format than in a binary format. Second, performing decimal arithmetic operations is more complex and generally slower than binary operations because there are discontinuities at the boundaries between decimal digits which are not present between binary digits.
Numerous techniques for performing decimal arithmetic operations in data processing systems are known in the prior art. Some techniques are described in the book entitled, Digital Computer Design Fundamentals, by Y. Chu, published by McGraw-Hill Book Company Inc., 1962 which is incorporated herein by reference. These techniques generally require that individual decimal digits be manipulated one digit at a time at some point in performing a decimal arithmetic operation.
Therefore, in order to speed up decimal operations, what is needed are methods to efficiently manipulate individual decimal digits within a data processing system and methods which reduce the number of digits which must be manipulated during any arithmetic operation.